<?php
/**
 * Author: 周斌斌 <553193368@qq.com>
 * Date: 17/3/7 PM2:23
 * 摘要:
 */

namespace app\shop\validate;


use think\Validate;

class SellerValidate extends Validate
{
    protected $rule = [
        ['goods_id', 'require', '请选择商品'],
        ['goods_num', 'require|between:0,200', '购买商品数量在0到200之间'],
        ['seller_id', 'require|gt:0', '请选择商户id'],
        ['category_id', 'require', '类型必须填写'],
        ['label_id', 'require', '参数不全'],
        ['province', 'require', '省必须填写'],
        ['city', 'require', '市必须填写'],
        ['district', 'require', '区域必须填写'],
        ['address', 'require', '详细地址必须填写'],
        ['manage', 'require', '负责人姓名必须填写'],
        ['idNumber', 'require', '负责人身份证号码必须填写'],
        ['sfzzm', 'require', '身份证正面必须填写'],
        ['mobile', 'require', '负责人手机号必须填写'],
        ['sfzfm', 'require', '身份证反面必须填写'],
        ['license', 'require', '营业执照必须填写'],
        ['shopname', 'require', '店铺名称必须填写'],
    ];

    protected $scene = [
        'seller' => ['seller_id'],
        'category' => ['category_id'],
        'label' => ['label_id'],
        'auth' => ['province', 'city', 'district', 'address', 'manage', 'sfzzm', 'mobile', 'sfzfm', 'license', 'shop_name', 'idNumber','category_id'],
        'search' => ['keyWord'],
    ];
}